<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>blam.ProjectBackgroundImageOntoMeshOperator</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="blam-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="blam-module.html">Module&nbsp;blam</a> ::
        Class&nbsp;ProjectBackgroundImageOntoMeshOperator
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class ProjectBackgroundImageOntoMeshOperator</h1><p class="nomargin-top"><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator">source&nbsp;code</a></span></p>
<pre class="base-tree">
bpy.types.Operator --+
                     |
                    <strong class="uidshort">ProjectBackgroundImageOntoMeshOperator</strong>
</pre>

<hr />
<p>Handles projection of images onto meshes.</p>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#meshVerticesToNDC" class="summary-sig-name">meshVerticesToNDC</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">cam</span>,
        <span class="summary-sig-arg">mesh</span>)</span><br />
      Express a set of vertices in normalized device coordinates (NDC), i.e
      image coordinates where (-1, -1) is the bottom left corner and (1, 1)
      is the top right corner.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.meshVerticesToNDC">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#addUVsProjectedFromView" class="summary-sig-name">addUVsProjectedFromView</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mesh</span>)</span><br />
      Adds a new UV layer to a given mesh and computes UV coordinates 
      projected from the active camera view for this layer</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.addUVsProjectedFromView">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#performSimpleProjection" class="summary-sig-name">performSimpleProjection</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">camera</span>,
        <span class="summary-sig-arg">mesh</span>,
        <span class="summary-sig-arg">img</span>)</span><br />
      Projects a given image onto a mesh using the image as the texture and
      UV coordinates projected from the active camera view.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.performSimpleProjection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#performHighQualityProjection" class="summary-sig-name">performHighQualityProjection</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">camera</span>,
        <span class="summary-sig-arg">mesh</span>,
        <span class="summary-sig-arg">img</span>)</span><br />
      Projects a given image onto a mesh using a simple subdivision 
      modifier followed by a UVProejct modifier.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.performHighQualityProjection">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#prepareMesh" class="summary-sig-name">prepareMesh</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">mesh</span>)</span><br />
      Cleans up a given input mesh in preparation for image projection.</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.prepareMesh">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="execute"></a><span class="summary-sig-name">execute</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">context</span>)</span><br />
      Get the active object and make sure it is a mesh</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.execute">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
</table>
<!-- ==================== CLASS VARIABLES ==================== -->
<a name="section-ClassVariables"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variables</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariables"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="bl_idname"></a><span class="summary-name">bl_idname</span> = <code title="&quot;object.project_bg_onto_mesh&quot;">&quot;object.project_bg_onto_mesh&quot;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="bl_label"></a><span class="summary-name">bl_label</span> = <code title="&quot;Project background image onto mesh&quot;">&quot;Project background image onto mesh&quot;</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a href="blam.ProjectBackgroundImageOntoMeshOperator-class.html#bl_description" class="summary-name">bl_description</a> = <code title="&quot;Projects the current 3D view background image onto a mesh (the active\
 object) from the active camera.&quot;">&quot;Projects the current 3D view background imag<code class="variable-ellipsis">...</code></code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="projectorName"></a><span class="summary-name">projectorName</span> = <code title="'tex_projector'">'tex_projector'</code>
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
        <a name="materialName"></a><span class="summary-name">materialName</span> = <code title="'cam_map_material'">'cam_map_material'</code>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="meshVerticesToNDC"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">meshVerticesToNDC</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">cam</span>,
        <span class="sig-arg">mesh</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.meshVerticesToNDC">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Express a set of vertices in normalized device coordinates (NDC), i.e 
  image coordinates where (-1, -1) is the bottom left corner and (1, 1) is 
  the top right corner.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>cam</code></strong> - The active camera.</li>
        <li><strong class="pname"><code>mesh</code></strong> - A mesh containing the vertices.</li>
    </ul></dd>
    <dt>Returns:</dt>
        <dd>The vertices in expressed in NDC.</dd>
  </dl>
</td></tr></table>
</div>
<a name="addUVsProjectedFromView"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">addUVsProjectedFromView</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">mesh</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.addUVsProjectedFromView">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Adds a new UV layer to a given mesh and computes UV coordinates 
  projected from the active camera view for this layer</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>mesh</code></strong> - The mesh to compute UV coordinates for.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="performSimpleProjection"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">performSimpleProjection</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">camera</span>,
        <span class="sig-arg">mesh</span>,
        <span class="sig-arg">img</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.performSimpleProjection">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Projects a given image onto a mesh using the image as the texture and 
  UV coordinates projected from the active camera view.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>camera</code></strong> - The active camera.</li>
        <li><strong class="pname"><code>mesh</code></strong> - The mesh to project the image onto.</li>
        <li><strong class="pname"><code>img</code></strong> - The image to project.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="performHighQualityProjection"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">performHighQualityProjection</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">camera</span>,
        <span class="sig-arg">mesh</span>,
        <span class="sig-arg">img</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.performHighQualityProjection">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Projects a given image onto a mesh using a simple subdivision modifier
  followed by a UVProejct modifier.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>camera</code></strong> - The active camera.</li>
        <li><strong class="pname"><code>mesh</code></strong> - The mesh to project the image onto.</li>
        <li><strong class="pname"><code>img</code></strong> - The image to project.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<a name="prepareMesh"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">prepareMesh</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">mesh</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="blam-pysrc.html#ProjectBackgroundImageOntoMeshOperator.prepareMesh">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <p>Cleans up a given input mesh in preparation for image projection.</p>
  <dl class="fields">
    <dt>Parameters:</dt>
    <dd><ul class="nomargin-top">
        <li><strong class="pname"><code>mesh</code></strong> - The mesh to clean up.</li>
    </ul></dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== CLASS VARIABLE DETAILS ==================== -->
<a name="section-ClassVariableDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Class Variable Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-ClassVariableDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="bl_description"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <h3 class="epydoc">bl_description</h3>
  
  <dl class="fields">
  </dl>
  <dl class="fields">
    <dt>Value:</dt>
      <dd><table><tr><td><pre class="variable">
&quot;Projects the current 3D view background image onto a mesh (the active<span class="variable-linewrap"><img src="crarr.png" alt="\" /></span>
 object) from the active camera.&quot;
</pre></td></tr></table>
</dd>
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="blam-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

      <th class="navbar" width="100%"></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Thu Feb  2 13:57:34 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
